package com.yh.doing.Mediator;

import lombok.Data;

import java.util.List;

/**
 * @program: design-patterns
 * @description: ${description}
 * @author: yangh0597@163.com
 * @date: 2021-03-11 00:22
 * @problem:
 **/
@Data
public class MyMediator extends Mediator {

    private ESColleague esColleague;
    private MysqlColleague mysqlColleague;
    private RedisColleague redisColleague;

    @Override
    public void mediatorExecutor(Class<? extends Colleague> clazz, String str) {
        if (clazz.equals(MysqlColleague.class)) {
            esColleague.add(str);
            redisColleague.add(str);
        } else if (clazz.equals(RedisColleague.class)) {
        } else {
            esColleague.add(str);
        }


    }


}
